package cn.lanca.gof0_5._05builder.case2.director;

import com.example.demo.gof0_5._05builder.case2.builder.Decorator;
import com.example.demo.gof0_5._05builder.case2.product.Parlour;

/**
 * 指挥者：项目经理
 *
 * @author meihongliang
 * @since 2020/8/7 17:12
 */
public class ProjectManager {
    private Decorator builder;

    public ProjectManager(Decorator builder) {
        this.builder = builder;
    }


    /**
     * 产品构建与组装方法
     *
     * @return Parlour
     */
    public Parlour decorate() {
        builder.buildWall();
        builder.buildTV();
        builder.buildSofa();
        return builder.getResult();
    }
}
